import java.util.Arrays;

public class Main {
    public static void BubbleSort(int[] arrays){
        for(int i=0;i< arrays.length-1;i++){
            for(int j=0;j< arrays.length-1-i;j++){
                if(arrays[j]<arrays[j+1]){
                    int tmp=arrays[j];
                    arrays[j]=arrays[j+1];
                    arrays[j+1]=tmp;
                }
            }
        }
    }

    public static void main(String[] args) {
        int[] arrays={20,64,73,5,108,84};
        System.out.println("排序前:"+ Arrays.toString(arrays));
        BubbleSort(arrays);
        System.out.println("排序后:"+Arrays.toString(arrays));
        int ret=Arrays.binarySearch(arrays,5);
        System.out.println(ret);
    }
}
